title SumArray

.386
.model flat, stdcall
.stack 4096

ExitProcess proto, dwExitCode: dword

.data
intarray dword 10000h, 20000h, 30000h, 40000h

.code
main proc
    mov edi, offset intarray
    mov ecx, lengthof intarray
    mov eax, 0
    L1:
        add eax, [edi]
        add edi, type intarray
        loop L1

    invoke ExitProcess, 0
main endp
end main